﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="lp_YesterDay.aspx.cs" Inherits="ZLDC.Estate.Quantify.lp_YesterDay" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>昨日检查工作</title>

    <script src="charts/FusionCharts.js" type="text/javascript"></script>

    <script src="flexigrid/jquery.js" type="text/javascript"></script>

    <link href="../css/main.css" rel="stylesheet" type="text/css" />
    <link href="css/page.css" rel="stylesheet" type="text/css" />

    <script src="../js/My97DatePicker/WdatePicker.js" type="text/javascript"></script>

    <script src="../js/LexunJS.js" type="text/javascript"></script>

    <script src="popup/popup2/popup.js" type="text/javascript"></script>

    <script src="js/lp_Basis.js" type="text/javascript"></script>

    <script src="charts/jquery.min.js" type="text/javascript"></script>

    <script src="charts/highcharts1.js" type="text/javascript"></script>

    <script src="js/GetUrl.js" type="text/javascript"></script>

    <script type="text/javascript">

        var opentype = LexunJS.GetQueryString("opentype"); // 楼盘ID

        function alifrm(uid, name, t_id, Other1, mainid) {
            //alert(document.getElementById("tbody1").rows[Other1].cells[0].childNodes[3].value)

            var ttype = "";

            if (Other1 == "0") {
                ttype = '(经理分配)';
            }
            if (Other1 == "1") {
                ttype = '(自由选择)';
            }
            var type = '<%=type %>';
            var time = document.getElementById('txtTime').value;

            ShowIframe("lp_PersonalDDetail.aspx?mainid=" + mainid + "&type=" + type + "&t_id=" + t_id + "&time=" + time + "&user_id=" + uid + "&name=" + name + "&opentype=" + opentype, 650, 500, name + "个人完成工作详细信息" + ttype);
        }



        window.onload = function() {
            var ta = document.getElementById('tb1');
            var cell1 = 0;
            var cell2 = 0;

            for (var i = 1; i < ta.rows.length - 1; i++) {
                cell1 += parseFloat(ta.rows[i].cells[1].childNodes[0].value == '' ? '0' : ta.rows[i].cells[1].childNodes[0].value);

                cell2 += parseFloat(ta.rows[i].cells[2].childNodes[0].value == '' ? '0' : ta.rows[i].cells[2].childNodes[0].value);
            }
            document.getElementById('numa1').innerHTML = cell1;
            document.getElementById('numa2').innerHTML = cell2;
        }

        function dateat(deptid) {
            ShowIframe("lp_YesterDays.aspx?deptid=" + deptid, 550, 450, "未检查工作日期");
            // document.getElementById('alit').style.display = document.getElementById('alit').style.display=="none"?"":"none";
        }
    </script>

</head>
<body>
    <form id="form1" runat="server">
   
    <div>
    <div  runat="server" id="depttd" style="width:170px ;float:left; display:none"> 
                    分行:
                    <select id="sBranch" name="sBranch" runat="server" style="width: 120px;">
                    </select>
                    
                </div>
             
                    <asp:TextBox ID="txtTime" runat="server" onClick="WdatePicker({skin:'whyGreen',maxDate:'%y-%M-{%d-1}'})"></asp:TextBox>
               
               
               
                    <asp:Button ID="btnxx" runat="server" Text="查询" OnClick="btnxx_Click" /><div id="a1"
                        runat="server">
             
    </div>
    <asp:Panel ID="Panel2" runat="server" Width="95%">
        <table border='0' cellpadding='0' cellspacing='1' bgcolor='#a8c7ce'>
            <tr>
                <td class='STYLE10'>
                    <table id="tb1" border='0' cellpadding='0' cellspacing='1' bgcolor='#a8c7ce' width="400px">
                        <thead>
                            <tr>
                                <th align="center" width="120" bgcolor='d3eaef' class='STYLE6'>
                                    姓名
                                </th>
                                <th align="center" width="80" bgcolor='d3eaef' class='STYLE6'>
                                    要求得分
                                </th>
                                <th align="center" width="80" bgcolor='d3eaef' class='STYLE6'>
                                    实际得分
                                </th>
                                <%-- <th align="center" width="220" bgcolor='d3eaef' class='STYLE6'>
                                        工作意见
                                    </th>--%>
                                <th align="center" bgcolor='d3eaef' class='STYLE6'>
                                </th>
                            </tr>
                        </thead>
                        <tbody id="tbody1">
                            <asp:Repeater ID="RpList" runat="server">
                                <ItemTemplate>
                                    <tr>
                                        <td class='STYLE10'>
                                            <%# ZLDC.Topo.BLL.Estate.lp_Basis.Gettf(Eval("isConfirm"))%><a title="点击此处查看详细" onclick='alifrm("<%# Eval("userid")%>","<%# Eval("Other2")%>",<%# Eval("deptid") %>,"<%# Eval("Other1").ToString()%>",<%#Eval("id") %>)'>
                                                <%# Eval("Other2")%><%#ZLDC.Topo.BLL.Estate.lp_Basis.UserDy(Eval("userid").ToString())%>
                                            </a>
                                            <asp:HiddenField ID="hidUserid" runat="server" Value='<%# Eval("userid")%>' />
                                            <asp:HiddenField ID="hidOther1" runat="server" />
                                        </td>
                                        <td class='STYLE10'>
                                            <asp:TextBox ID="txttotal" nkeypress="event.returnValue=false;" onkeydown="myKeyDown()"
                                                Width="95%" ReadOnly="true" BorderStyle="None" runat="server"></asp:TextBox>
                                        </td>
                                        <td class='STYLE10'>
                                            <asp:TextBox ID="txtActual_Goal" onkeypress="event.returnValue=false;" onkeydown="myKeyDown()"
                                                Width="95%" ReadOnly="true" BorderStyle="None" runat="server"></asp:TextBox>
                                        </td>
                                        <%--      <td class='STYLE10'>
                                                <asp:TextBox ID="txtRemark" Width="98%" Height="30px" TextMode="MultiLine" runat="server"></asp:TextBox>
                                            </td>--%>
                                        <td class='STYLE10' style="display: none">
                                            <asp:CheckBox ID="ckb" runat="server" />
                                        </td>
                                        <td>
                                            <%# YJ(Eval("userid").ToString())%>
                                        </td>
                                    </tr>
                                </ItemTemplate>
                            </asp:Repeater>
                            <tr>
                                <td>
                                    总分:
                                </td>
                                <td>
                                    <a id="numa1"></a>
                                </td>
                                <td>
                                    <a id="numa2"></a>
                                </td>
                                <td>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <span style="display: none">
                        <asp:Button ID="btnUP" runat="server" Text="完成工作检查" CssClass="button1" OnClick="btnUP_Click" />
                    </span>&nbsp;&nbsp;
                    <input id="Button1" type="button" value="参考其他区域组别情况" class="button1" onclick='btnal()' />

                    <script type="text/javascript">
                        function btnal() {
                            var time = document.getElementById('txtTime').value;
                            var deptid = '<%=deptid %>';
                            var depttype = '<%=depttype %>';
                            if (depttype == '区域') {
                                deptid = document.getElementById('sBranch').value;
                            }
                            parent.closeTab("参考其他区域");
                            parent.addTab("参考其他区域", "../Quantify/lp_Addition_left.aspx?deptid=" + escape(deptid) + "&type=2&time=" + time + "", "icon-nav");
                        }
                    </script>

                </td>
                <td width="500px">
                    <div style="font-size: 13px; font-weight: bold">
                        <span id="YesterDay" runat="server"></span><span id="District" runat="server"></span>
                        <span id="Average" runat="server"></span>
                    </div>
                    <asp:Literal ID="myNext" runat="server"></asp:Literal>
                    <asp:HiddenField ID="hidchart" runat="server" />
                    <div id="diccharttoday">
                    </div>
                    <%=ZLDC.Topo.BLL.Estate.lp_Basis.GetManagerlh()%>

                    <script type="text/javascript">
                        if (document.getElementById('hidchart').value != "") {
                            var todaychart = "[";
                            todaychart += document.getElementById('hidchart').value;
                            todaychart = todaychart.substring(0, todaychart.length - 1);
                            todaychart += "]";
                            todaychart = eval('' + todaychart + '');
                            chartxsDeptlist(todaychart, '昨日得分', 'diccharttoday', 1);
                        }
                    </script>

                </td>
            </tr>
        </table>
    </asp:Panel>
    </div>

    <script type="text/javascript">
        function datealert(deptid) {
            alert(deptid)
            //ShowIframe();
        }
    </script>

    </form>
</body>
</html>
